import { request } from '@umijs/max';

export interface PopularSiteVO {
  id: string;
  siteName: string;
  siteUrl: string;
  sitePic: string;
}

export interface PopularSiteDTO {
  id: string;
  siteName: string;
  siteUrl: string;
  sitePic: string;
}

export const  addPopularSite = async (body: PopularSiteDTO): Promise<any> => {
    return request('/api/popular-site/add',{
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body
    })
}
export const  updatePopularSite = async (body: PopularSiteDTO): Promise<any> => {
  return request('/api/popular-site/update',{
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body
  })
}
export const  deletePopularSite = async (body: PopularSiteDTO): Promise<any> => {
  return request('/api/popular-site/delete',{
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body
  })
}
export const  listPopularSite = async (body: PopularSiteDTO): Promise<any> => {
  return request('/api/popular-site/list',{
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body
  })
}
